<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: OpenGL interoperability</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a> |
<a href="#nested-classes">Classes</a> |
<a href="#enum-members">Enumerations</a> |
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">OpenGL interoperability<div class="ingroups"><a class="el" href="../../d0/de1/group__core.html">Core functionality</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:d1/d36/namespacecv_1_1ogl_1_1ocl"><td align="right" class="memItemLeft" valign="top">  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d36/namespacecv_1_1ogl_1_1ocl.html">cv::ogl::ocl</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d53/classcv_1_1ogl_1_1Arrays.html">cv::ogl::Arrays</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Wrapper for OpenGL Client-Side Vertex arrays.  <a href="../../d6/d53/classcv_1_1ogl_1_1Arrays.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d68/classcv_1_1ogl_1_1Buffer.html">cv::ogl::Buffer</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Smart pointer for OpenGL buffer object with reference counting.  <a href="../../d3/d68/classcv_1_1ogl_1_1Buffer.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/ddf/classcv_1_1ogl_1_1Texture2D.html">cv::ogl::Texture2D</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Smart pointer for OpenGL 2D texture memory with reference counting.  <a href="../../d5/ddf/classcv_1_1ogl_1_1Texture2D.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gaf53526c205a92260f356fe6589460aab"><td align="right" class="memItemLeft" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3c/group__core__opengl.html#gaf53526c205a92260f356fe6589460aab">cv::ogl::RenderModes</a> { <br/>
  <a class="el" href="../../d2/d3c/group__core__opengl.html#ggaf53526c205a92260f356fe6589460aaba8b467f66c33c13df37f24aa3f1196f14">cv::ogl::POINTS</a> = 0x0000, 
<br/>
  <a class="el" href="../../d2/d3c/group__core__opengl.html#ggaf53526c205a92260f356fe6589460aaba8ea1de81114c3db43c9dfa96870367a0">cv::ogl::LINES</a> = 0x0001, 
<br/>
  <a class="el" href="../../d2/d3c/group__core__opengl.html#ggaf53526c205a92260f356fe6589460aabaf4d36edb6cf9011af8cf4015b5a61952">cv::ogl::LINE_LOOP</a> = 0x0002, 
<br/>
  <a class="el" href="../../d2/d3c/group__core__opengl.html#ggaf53526c205a92260f356fe6589460aaba7aa95cc95670cd6bb875d0092e3bf457">cv::ogl::LINE_STRIP</a> = 0x0003, 
<br/>
  <a class="el" href="../../d2/d3c/group__core__opengl.html#ggaf53526c205a92260f356fe6589460aabab2fc9178ebe34e531f1451751e673c7d">cv::ogl::TRIANGLES</a> = 0x0004, 
<br/>
  <a class="el" href="../../d2/d3c/group__core__opengl.html#ggaf53526c205a92260f356fe6589460aabae656afaa0987fa2f044e3fdc260aa140">cv::ogl::TRIANGLE_STRIP</a> = 0x0005, 
<br/>
  <a class="el" href="../../d2/d3c/group__core__opengl.html#ggaf53526c205a92260f356fe6589460aaba1778386fd1796017cf36965339b27cf7">cv::ogl::TRIANGLE_FAN</a> = 0x0006, 
<br/>
  <a class="el" href="../../d2/d3c/group__core__opengl.html#ggaf53526c205a92260f356fe6589460aaba6fe3c72a87b56e3f16bc1cf13fa9fc53">cv::ogl::QUADS</a> = 0x0007, 
<br/>
  <a class="el" href="../../d2/d3c/group__core__opengl.html#ggaf53526c205a92260f356fe6589460aabaa746cc01f0f606c16249ef41beb14eaa">cv::ogl::QUAD_STRIP</a> = 0x0008, 
<br/>
  <a class="el" href="../../d2/d3c/group__core__opengl.html#ggaf53526c205a92260f356fe6589460aaba8c8c07e1f038e9fe452b06fb80d15c10">cv::ogl::POLYGON</a> = 0x0009
<br/>
 }<tr class="memdesc:gaf53526c205a92260f356fe6589460aab"><td class="mdescLeft"> </td><td class="mdescRight">render mode  <a href="../../d2/d3c/group__core__opengl.html#gaf53526c205a92260f356fe6589460aab">More...</a><br/></td></tr>
</td></tr>
<tr class="separator:gaf53526c205a92260f356fe6589460aab"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gad2a559f1b93a89fa4936948f4c4c4bb2"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3c/group__core__opengl.html#gad2a559f1b93a89fa4936948f4c4c4bb2">cv::ogl::convertFromGLTexture2D</a> (const <a class="el" href="../../d5/ddf/classcv_1_1ogl_1_1Texture2D.html">Texture2D</a> &amp;texture, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> dst)</td></tr>
<tr class="memdesc:gad2a559f1b93a89fa4936948f4c4c4bb2"><td class="mdescLeft"> </td><td class="mdescRight">Converts <a class="el" href="../../d5/ddf/classcv_1_1ogl_1_1Texture2D.html" title="Smart pointer for OpenGL 2D texture memory with reference counting. ">Texture2D</a> object to OutputArray.  <a href="../../d2/d3c/group__core__opengl.html#gad2a559f1b93a89fa4936948f4c4c4bb2">More...</a><br/></td></tr>
<tr class="separator:gad2a559f1b93a89fa4936948f4c4c4bb2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga5ab4018bf271aecf8b7144e46ff363e9"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3c/group__core__opengl.html#ga5ab4018bf271aecf8b7144e46ff363e9">cv::ogl::convertToGLTexture2D</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src, <a class="el" href="../../d5/ddf/classcv_1_1ogl_1_1Texture2D.html">Texture2D</a> &amp;texture)</td></tr>
<tr class="memdesc:ga5ab4018bf271aecf8b7144e46ff363e9"><td class="mdescLeft"> </td><td class="mdescRight">Converts InputArray to <a class="el" href="../../d5/ddf/classcv_1_1ogl_1_1Texture2D.html" title="Smart pointer for OpenGL 2D texture memory with reference counting. ">Texture2D</a> object.  <a href="../../d2/d3c/group__core__opengl.html#ga5ab4018bf271aecf8b7144e46ff363e9">More...</a><br/></td></tr>
<tr class="separator:ga5ab4018bf271aecf8b7144e46ff363e9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga39ac62ef00a590b9021e233d1dcdc622"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d7/d45/classcv_1_1UMat.html">UMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3c/group__core__opengl.html#ga39ac62ef00a590b9021e233d1dcdc622">cv::ogl::mapGLBuffer</a> (const <a class="el" href="../../d3/d68/classcv_1_1ogl_1_1Buffer.html">Buffer</a> &amp;buffer, <a class="el" href="../../dc/d84/group__core__basic.html#ga6226c29c7b0e7bda7aff72e96ba8e1df">AccessFlag</a> accessFlags=<a class="el" href="../../dc/d84/group__core__basic.html#gga6226c29c7b0e7bda7aff72e96ba8e1dfa39d5f615d02cac084ab1dd0cb4f7c221">ACCESS_READ</a>|<a class="el" href="../../dc/d84/group__core__basic.html#gga6226c29c7b0e7bda7aff72e96ba8e1dfafcb8f7013ace1726cd1bbeea800bc7b6">ACCESS_WRITE</a>)</td></tr>
<tr class="memdesc:ga39ac62ef00a590b9021e233d1dcdc622"><td class="mdescLeft"> </td><td class="mdescRight">Maps <a class="el" href="../../d3/d68/classcv_1_1ogl_1_1Buffer.html" title="Smart pointer for OpenGL buffer object with reference counting. ">Buffer</a> object to process on CL side (convert to <a class="el" href="../../d7/d45/classcv_1_1UMat.html">UMat</a>).  <a href="../../d2/d3c/group__core__opengl.html#ga39ac62ef00a590b9021e233d1dcdc622">More...</a><br/></td></tr>
<tr class="separator:ga39ac62ef00a590b9021e233d1dcdc622"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga64c7a6323ba1b978f2f9142a4bad5ca1"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3c/group__core__opengl.html#ga64c7a6323ba1b978f2f9142a4bad5ca1">cv::ogl::render</a> (const <a class="el" href="../../d5/ddf/classcv_1_1ogl_1_1Texture2D.html">Texture2D</a> &amp;tex, <a class="el" href="../../d2/d44/classcv_1_1Rect__.html">Rect_</a>&lt; double &gt; wndRect=<a class="el" href="../../d2/d44/classcv_1_1Rect__.html">Rect_</a>&lt; double &gt;(0.0, 0.0, 1.0, 1.0), <a class="el" href="../../d2/d44/classcv_1_1Rect__.html">Rect_</a>&lt; double &gt; texRect=<a class="el" href="../../d2/d44/classcv_1_1Rect__.html">Rect_</a>&lt; double &gt;(0.0, 0.0, 1.0, 1.0))</td></tr>
<tr class="memdesc:ga64c7a6323ba1b978f2f9142a4bad5ca1"><td class="mdescLeft"> </td><td class="mdescRight">Render OpenGL texture or primitives.  <a href="../../d2/d3c/group__core__opengl.html#ga64c7a6323ba1b978f2f9142a4bad5ca1">More...</a><br/></td></tr>
<tr class="separator:ga64c7a6323ba1b978f2f9142a4bad5ca1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga0f86b878c8b65fe081fd4f7ac1e62110"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3c/group__core__opengl.html#ga0f86b878c8b65fe081fd4f7ac1e62110">cv::ogl::render</a> (const <a class="el" href="../../d6/d53/classcv_1_1ogl_1_1Arrays.html">Arrays</a> &amp;arr, int mode=<a class="el" href="../../d2/d3c/group__core__opengl.html#ggaf53526c205a92260f356fe6589460aaba8b467f66c33c13df37f24aa3f1196f14">POINTS</a>, <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> color=<a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f">Scalar::all</a>(255))</td></tr>
<tr class="separator:ga0f86b878c8b65fe081fd4f7ac1e62110"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga090c1f371c37a575dea8b5c6371aec70"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3c/group__core__opengl.html#ga090c1f371c37a575dea8b5c6371aec70">cv::ogl::render</a> (const <a class="el" href="../../d6/d53/classcv_1_1ogl_1_1Arrays.html">Arrays</a> &amp;arr, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> indices, int mode=<a class="el" href="../../d2/d3c/group__core__opengl.html#ggaf53526c205a92260f356fe6589460aaba8b467f66c33c13df37f24aa3f1196f14">POINTS</a>, <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> color=<a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f">Scalar::all</a>(255))</td></tr>
<tr class="separator:ga090c1f371c37a575dea8b5c6371aec70"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga7da4b94fc78501f4239c132901387730"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3c/group__core__opengl.html#ga7da4b94fc78501f4239c132901387730">cv::cuda::setGlDevice</a> (int device=0)</td></tr>
<tr class="memdesc:ga7da4b94fc78501f4239c132901387730"><td class="mdescLeft"> </td><td class="mdescRight">Sets a CUDA device and initializes it for the current thread with OpenGL interoperability.  <a href="../../d2/d3c/group__core__opengl.html#ga7da4b94fc78501f4239c132901387730">More...</a><br/></td></tr>
<tr class="separator:ga7da4b94fc78501f4239c132901387730"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga7503c23aabed6fbe4f20b500bb921e71"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3c/group__core__opengl.html#ga7503c23aabed6fbe4f20b500bb921e71">cv::ogl::unmapGLBuffer</a> (<a class="el" href="../../d7/d45/classcv_1_1UMat.html">UMat</a> &amp;u)</td></tr>
<tr class="memdesc:ga7503c23aabed6fbe4f20b500bb921e71"><td class="mdescLeft"> </td><td class="mdescRight">Unmaps <a class="el" href="../../d3/d68/classcv_1_1ogl_1_1Buffer.html" title="Smart pointer for OpenGL buffer object with reference counting. ">Buffer</a> object (releases <a class="el" href="../../d7/d45/classcv_1_1UMat.html">UMat</a>, previously mapped from <a class="el" href="../../d3/d68/classcv_1_1ogl_1_1Buffer.html" title="Smart pointer for OpenGL buffer object with reference counting. ">Buffer</a>).  <a href="../../d2/d3c/group__core__opengl.html#ga7503c23aabed6fbe4f20b500bb921e71">More...</a><br/></td></tr>
<tr class="separator:ga7503c23aabed6fbe4f20b500bb921e71"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>This section describes OpenGL interoperability.</p>
<p>To enable OpenGL support, configure OpenCV using CMake with WITH_OPENGL=ON . Currently OpenGL is supported only with WIN32, GTK and Qt backends on Windows and Linux (MacOS and Android are not supported). For GTK backend gtkglext-1.0 library is required.</p>
<p>To use OpenGL functionality you should first create OpenGL context (window or frame buffer). You can do this with namedWindow function or with other OpenGL toolkit (GLUT, for example). </p>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="gaf53526c205a92260f356fe6589460aab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf53526c205a92260f356fe6589460aab">◆ </a></span>RenderModes</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../d2/d3c/group__core__opengl.html#gaf53526c205a92260f356fe6589460aab">cv::ogl::RenderModes</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/db0/opengl_8hpp.html">opencv2/core/opengl.hpp</a>&gt;</code></p>
<p>render mode </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggaf53526c205a92260f356fe6589460aaba8b467f66c33c13df37f24aa3f1196f14"></a>POINTS <div class="python_language">Python: cv.ogl.POINTS</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ggaf53526c205a92260f356fe6589460aaba8ea1de81114c3db43c9dfa96870367a0"></a>LINES <div class="python_language">Python: cv.ogl.LINES</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ggaf53526c205a92260f356fe6589460aabaf4d36edb6cf9011af8cf4015b5a61952"></a>LINE_LOOP <div class="python_language">Python: cv.ogl.LINE_LOOP</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ggaf53526c205a92260f356fe6589460aaba7aa95cc95670cd6bb875d0092e3bf457"></a>LINE_STRIP <div class="python_language">Python: cv.ogl.LINE_STRIP</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ggaf53526c205a92260f356fe6589460aabab2fc9178ebe34e531f1451751e673c7d"></a>TRIANGLES <div class="python_language">Python: cv.ogl.TRIANGLES</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ggaf53526c205a92260f356fe6589460aabae656afaa0987fa2f044e3fdc260aa140"></a>TRIANGLE_STRIP <div class="python_language">Python: cv.ogl.TRIANGLE_STRIP</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ggaf53526c205a92260f356fe6589460aaba1778386fd1796017cf36965339b27cf7"></a>TRIANGLE_FAN <div class="python_language">Python: cv.ogl.TRIANGLE_FAN</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ggaf53526c205a92260f356fe6589460aaba6fe3c72a87b56e3f16bc1cf13fa9fc53"></a>QUADS <div class="python_language">Python: cv.ogl.QUADS</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ggaf53526c205a92260f356fe6589460aabaa746cc01f0f606c16249ef41beb14eaa"></a>QUAD_STRIP <div class="python_language">Python: cv.ogl.QUAD_STRIP</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ggaf53526c205a92260f356fe6589460aaba8c8c07e1f038e9fe452b06fb80d15c10"></a>POLYGON <div class="python_language">Python: cv.ogl.POLYGON</div></td><td class="fielddoc"></td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="gad2a559f1b93a89fa4936948f4c4c4bb2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad2a559f1b93a89fa4936948f4c4c4bb2">◆ </a></span>convertFromGLTexture2D()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::ogl::convertFromGLTexture2D </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d5/ddf/classcv_1_1ogl_1_1Texture2D.html">Texture2D</a> &amp; </td>
          <td class="paramname"><em>texture</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>dst</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/db0/opengl_8hpp.html">opencv2/core/opengl.hpp</a>&gt;</code></p>
<p>Converts <a class="el" href="../../d5/ddf/classcv_1_1ogl_1_1Texture2D.html" title="Smart pointer for OpenGL 2D texture memory with reference counting. ">Texture2D</a> object to OutputArray. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">texture</td><td>- source <a class="el" href="../../d5/ddf/classcv_1_1ogl_1_1Texture2D.html" title="Smart pointer for OpenGL 2D texture memory with reference counting. ">Texture2D</a> object. </td></tr>
    <tr><td class="paramname">dst</td><td>- destination OutputArray. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga5ab4018bf271aecf8b7144e46ff363e9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5ab4018bf271aecf8b7144e46ff363e9">◆ </a></span>convertToGLTexture2D()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::ogl::convertToGLTexture2D </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d5/ddf/classcv_1_1ogl_1_1Texture2D.html">Texture2D</a> &amp; </td>
          <td class="paramname"><em>texture</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/db0/opengl_8hpp.html">opencv2/core/opengl.hpp</a>&gt;</code></p>
<p>Converts InputArray to <a class="el" href="../../d5/ddf/classcv_1_1ogl_1_1Texture2D.html" title="Smart pointer for OpenGL 2D texture memory with reference counting. ">Texture2D</a> object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>- source InputArray. </td></tr>
    <tr><td class="paramname">texture</td><td>- destination <a class="el" href="../../d5/ddf/classcv_1_1ogl_1_1Texture2D.html" title="Smart pointer for OpenGL 2D texture memory with reference counting. ">Texture2D</a> object. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga39ac62ef00a590b9021e233d1dcdc622"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga39ac62ef00a590b9021e233d1dcdc622">◆ </a></span>mapGLBuffer()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d7/d45/classcv_1_1UMat.html">UMat</a> cv::ogl::mapGLBuffer </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d68/classcv_1_1ogl_1_1Buffer.html">Buffer</a> &amp; </td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga6226c29c7b0e7bda7aff72e96ba8e1df">AccessFlag</a> </td>
          <td class="paramname"><em>accessFlags</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#gga6226c29c7b0e7bda7aff72e96ba8e1dfa39d5f615d02cac084ab1dd0cb4f7c221">ACCESS_READ</a>|<a class="el" href="../../dc/d84/group__core__basic.html#gga6226c29c7b0e7bda7aff72e96ba8e1dfafcb8f7013ace1726cd1bbeea800bc7b6">ACCESS_WRITE</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/db0/opengl_8hpp.html">opencv2/core/opengl.hpp</a>&gt;</code></p>
<p>Maps <a class="el" href="../../d3/d68/classcv_1_1ogl_1_1Buffer.html" title="Smart pointer for OpenGL buffer object with reference counting. ">Buffer</a> object to process on CL side (convert to <a class="el" href="../../d7/d45/classcv_1_1UMat.html">UMat</a>). </p>
<p>Function creates CL buffer from GL one, and then constructs <a class="el" href="../../d7/d45/classcv_1_1UMat.html">UMat</a> that can be used to process buffer data with OpenCV functions. Note that in current implementation <a class="el" href="../../d7/d45/classcv_1_1UMat.html">UMat</a> constructed this way doesn't own corresponding GL buffer object, so it is the user responsibility to close down CL/GL buffers relationships by explicitly calling <a class="el" href="../../d2/d3c/group__core__opengl.html#ga7503c23aabed6fbe4f20b500bb921e71" title="Unmaps Buffer object (releases UMat, previously mapped from Buffer). ">unmapGLBuffer()</a> function. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">buffer</td><td>- source <a class="el" href="../../d3/d68/classcv_1_1ogl_1_1Buffer.html" title="Smart pointer for OpenGL buffer object with reference counting. ">Buffer</a> object. </td></tr>
    <tr><td class="paramname">accessFlags</td><td>- data access flags (ACCESS_READ|ACCESS_WRITE). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns <a class="el" href="../../d7/d45/classcv_1_1UMat.html">UMat</a> object </dd></dl>
</div>
</div>
<a id="ga64c7a6323ba1b978f2f9142a4bad5ca1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga64c7a6323ba1b978f2f9142a4bad5ca1">◆ </a></span>render() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::ogl::render </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d5/ddf/classcv_1_1ogl_1_1Texture2D.html">Texture2D</a> &amp; </td>
          <td class="paramname"><em>tex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d2/d44/classcv_1_1Rect__.html">Rect_</a>&lt; double &gt; </td>
          <td class="paramname"><em>wndRect</em> = <code><a class="el" href="../../d2/d44/classcv_1_1Rect__.html">Rect_</a>&lt; double &gt;(0.0, 0.0, 1.0, 1.0)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d2/d44/classcv_1_1Rect__.html">Rect_</a>&lt; double &gt; </td>
          <td class="paramname"><em>texRect</em> = <code><a class="el" href="../../d2/d44/classcv_1_1Rect__.html">Rect_</a>&lt; double &gt;(0.0, 0.0, 1.0, 1.0)</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/db0/opengl_8hpp.html">opencv2/core/opengl.hpp</a>&gt;</code></p>
<p>Render OpenGL texture or primitives. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tex</td><td>Texture to draw. </td></tr>
    <tr><td class="paramname">wndRect</td><td>Region of window, where to draw a texture (normalized coordinates). </td></tr>
    <tr><td class="paramname">texRect</td><td>Region of texture to draw (normalized coordinates). </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga0f86b878c8b65fe081fd4f7ac1e62110"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0f86b878c8b65fe081fd4f7ac1e62110">◆ </a></span>render() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::ogl::render </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d6/d53/classcv_1_1ogl_1_1Arrays.html">Arrays</a> &amp; </td>
          <td class="paramname"><em>arr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>mode</em> = <code><a class="el" href="../../d2/d3c/group__core__opengl.html#ggaf53526c205a92260f356fe6589460aaba8b467f66c33c13df37f24aa3f1196f14">POINTS</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> </td>
          <td class="paramname"><em>color</em> = <code><a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f">Scalar::all</a>(255)</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/db0/opengl_8hpp.html">opencv2/core/opengl.hpp</a>&gt;</code></p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">arr</td><td>Array of privitives vertices. </td></tr>
    <tr><td class="paramname">mode</td><td>Render mode. One of <a class="el" href="../../d2/d3c/group__core__opengl.html#gaf53526c205a92260f356fe6589460aab" title="render mode ">cv::ogl::RenderModes</a> </td></tr>
    <tr><td class="paramname">color</td><td>Color for all vertices. Will be used if arr doesn't contain color array. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga090c1f371c37a575dea8b5c6371aec70"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga090c1f371c37a575dea8b5c6371aec70">◆ </a></span>render() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::ogl::render </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d6/d53/classcv_1_1ogl_1_1Arrays.html">Arrays</a> &amp; </td>
          <td class="paramname"><em>arr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>indices</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>mode</em> = <code><a class="el" href="../../d2/d3c/group__core__opengl.html#ggaf53526c205a92260f356fe6589460aaba8b467f66c33c13df37f24aa3f1196f14">POINTS</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> </td>
          <td class="paramname"><em>color</em> = <code><a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f">Scalar::all</a>(255)</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/db0/opengl_8hpp.html">opencv2/core/opengl.hpp</a>&gt;</code></p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">arr</td><td>Array of privitives vertices. </td></tr>
    <tr><td class="paramname">indices</td><td>Array of vertices indices (host or device memory). </td></tr>
    <tr><td class="paramname">mode</td><td>Render mode. One of <a class="el" href="../../d2/d3c/group__core__opengl.html#gaf53526c205a92260f356fe6589460aab" title="render mode ">cv::ogl::RenderModes</a> </td></tr>
    <tr><td class="paramname">color</td><td>Color for all vertices. Will be used if arr doesn't contain color array. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga7da4b94fc78501f4239c132901387730"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7da4b94fc78501f4239c132901387730">◆ </a></span>setGlDevice()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::cuda::setGlDevice </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>device</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/db0/opengl_8hpp.html">opencv2/core/opengl.hpp</a>&gt;</code></p>
<p>Sets a CUDA device and initializes it for the current thread with OpenGL interoperability. </p>
<p>This function should be explicitly called after OpenGL context creation and before any CUDA calls. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">device</td><td>System index of a CUDA device starting with 0. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga7503c23aabed6fbe4f20b500bb921e71"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7503c23aabed6fbe4f20b500bb921e71">◆ </a></span>unmapGLBuffer()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::ogl::unmapGLBuffer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d7/d45/classcv_1_1UMat.html">UMat</a> &amp; </td>
          <td class="paramname"><em>u</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/db0/opengl_8hpp.html">opencv2/core/opengl.hpp</a>&gt;</code></p>
<p>Unmaps <a class="el" href="../../d3/d68/classcv_1_1ogl_1_1Buffer.html" title="Smart pointer for OpenGL buffer object with reference counting. ">Buffer</a> object (releases <a class="el" href="../../d7/d45/classcv_1_1UMat.html">UMat</a>, previously mapped from <a class="el" href="../../d3/d68/classcv_1_1ogl_1_1Buffer.html" title="Smart pointer for OpenGL buffer object with reference counting. ">Buffer</a>). </p>
<p>Function must be called explicitly by the user for each <a class="el" href="../../d7/d45/classcv_1_1UMat.html">UMat</a> previously constructed by the call to <a class="el" href="../../d2/d3c/group__core__opengl.html#ga39ac62ef00a590b9021e233d1dcdc622" title="Maps Buffer object to process on CL side (convert to UMat). ">mapGLBuffer()</a> function. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">u</td><td>- source <a class="el" href="../../d7/d45/classcv_1_1UMat.html">UMat</a>, created by <a class="el" href="../../d2/d3c/group__core__opengl.html#ga39ac62ef00a590b9021e233d1dcdc622" title="Maps Buffer object to process on CL side (convert to UMat). ">mapGLBuffer()</a>. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:40 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
